/**
 * Copyright 2007-2008. Chongqing First Information & Network Co., Ltd. All
 * rights reserved. <a>http://www.cqfirst.com.cn</a>
 */
package com.cqcis.uip.base.framework.common.impl;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.cqcis.uip.base.framework.common.Attributes;




/**
 * @author huangmy
 * @date 2008-1-11
 */
public class AttributesImpl<T> implements Attributes<T> {
	private static final long serialVersionUID = 1L;
	private Map<String, T> attributes = new ConcurrentHashMap<String, T>();

	public Map<String, T> getAttributes() {
		return attributes;
	}

	public void setAttributes(Map<String, T> attributes) {
		this.attributes = attributes;
	}

	public T setAttribute(String name, T value) {
		return this.attributes.put(name, value);
	}

	public T getAttribute(String name) {
		return this.attributes.get(name);
	}

	public T removeAttribute(String name) {
		return this.attributes.remove(name);
	}
}
